package com.persondemo.videoappliction.ui.adapter;

import android.content.Context;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.persondemo.videoappliction.R;
import com.persondemo.videoappliction.bean.MeShopBean;
import com.persondemo.videoappliction.utils.ImageLoaderUtil;

import java.util.List;

public class PutShopAdapter extends BaseQuickAdapter<MeShopBean.DataBean,BaseViewHolder> {
    private Context mcontext;

    public PutShopAdapter(Context context, @Nullable List<MeShopBean.DataBean> data) {
        super(R.layout.item_put_shop, data);
        mcontext=context;
    }

    @Override
    protected void convert(BaseViewHolder helper, MeShopBean.DataBean item) {
        ImageLoaderUtil.LoadImage(mcontext,item.getImgs(),helper.getView(R.id.putshop_img));
        helper.setText(R.id.putshop_title,item.getTitle());
        helper.setText(R.id.putshop_phone_num,item.getPhone());
        helper.setText(R.id.putshop_adress,item.getAddress());
        helper.addOnClickListener(R.id.meshop_delte);
    }
}
